package com.jet.member.service;

import com.jet.member.domain.dto.MemberTimeCardConsumeDto;
import com.jet.member.domain.dto.MemberTimeCardDto;
import com.jet.member.domain.dto.MemberTimeCardLogDto;
import com.jet.member.domain.entity.MemberTimeCard;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jet.member.domain.vo.MemberTimeCardListVo;
import com.jet.member.domain.vo.TimeCardChangeVo;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2025-03-02
 */
public interface IMemberTimeCardService extends IService<MemberTimeCard> {

    MemberTimeCard save(MemberTimeCardDto dto);

    MemberTimeCard edit(String id, String memberId, int addTimeCard, int expireType, LocalDateTime expireTime);

    MemberTimeCard edit(String id, String memberId, int timeCard);

    void deleteById(String id);

    void created(String accountId, String memberId, String orderNo, int quantity, String ruleId);

    void countedChange(MemberTimeCardLogDto dto);

    void refund(String accountId, String memberId, String refundNo, BigDecimal quantity, String ruleId);

    TimeCardChangeVo timeCardConsume(String accountId, MemberTimeCardConsumeDto dto);

    void afterCountedChange(MemberTimeCardLogDto logDto);

    TimeCardChangeVo timeCardRefund(String accountId, MemberTimeCardConsumeDto dto);

    MemberTimeCard findByMemberIdAndTimeCardRuleId(String memberId, String timeCardRuleId);

    List<MemberTimeCard> findAllByMemberIdAndSpuId(String memberId, String spuId);

    List<MemberTimeCardListVo> findAllByMemberId(String memberId);
}
